package t20211225;

import java.util.*;

/**
 * @Author: DengJia
 * @Date: 2021/12/25 14:22
 * @Description:
 */

public class Main {
    public static void main(String[] args) {
        List<Integer> list = new ArrayList<Integer>() {{
            add(4);
            add(3);
            add(1);
            add(5);
            add(2);
        }};

        Iterator<Integer> i = list.iterator();
        while (i.hasNext()) {
            System.out.println("i = " + i.next());
        }

        System.out.println(" ---------------------- ");

        ListIterator<Integer> li = list.listIterator(list.size());
        while (li.hasPrevious()) {
            System.out.println("i = " + li.previous());
        }

        new TreeSet<>(String.CASE_INSENSITIVE_ORDER);
    }
}
